/**
 * ***************************************************************************
 * Define all Constants.
 *
 * @author Ouyang Qi
 * @version 1.0.0 2008/11/14 (Standardized)
 * <PRE>
 * [Revision History]
 * 2008/09/26    ver1.0.0    Creation        Ouyang Qi
 * </PRE>
 * Copyright 2008 USI, All rights reserved.
 * ***************************************************************************
 */
var Constants = {
	APP_ERROR : "appError",
	SYS_ERROR : "sysError",
	LOGIN_ERROR : "loginError",
	RET_CANCEL : "ret.cancel",
	PERSONAL_CLIENT_COMPENT_ID : "personalizationClient"
}
var ActionConstants = {
	//system
	SYSTEM_ERROR_REDIRECT :"/user/systemErrorRedirect",
	//Widget
	WIDGET_RELOAD : "/user/widgetReload",
	ABOUT_WIDGET : "/user/aboutWidget",
	WELCOME : "/user/Welcome",
	LOGIN : "/user/Login",
	LOGOUT : "/user/logout",
	ALL_SEARCH : "/user/allSearch",
	BREADCRUMB_SEARCH : "/user/breadCrumbSearch",
	NARROW_DOWN_SEARCH : "/user/narrowDownSearch",
	DATA_CHAIN_SEARCH : "/user/dataChainSearch",
	DOC_REF_COUNT : "/user/docRefCount",
	SEARCH_FOLDER_SEARCH : "/user/searchFolderSearch",
	TAG_SEARCH : "/user/tagSearch",
	// SIMILAR_SEARCH : "/user/similarSearch",
	REFINE_SIMILAR_SEARCH : "/user/refineSimilarSearch",
	EXCLUDE_SIMILAR_SEARCH : "/user/excludeSimilarSearch",
	PAGINATE : "/user/paginate",
	LOAD_SEARCH_RESULT : "/user/loadSearchResult",
	LOAD_CROSS_TAB : "/user/loadCrossTab",
	LOAD_CROSS_TAB_SETTING : "/user/loadCrossTabSetting",
	CROSS_TAB_SEARCH : "/user/crossTabSearch",
	CROSS_SEARCH : "/user/crossSearch",
	CROSS_TAB_DOWNLOAD : "/user/crossTabCreateCSV",
	CROSS_TAB_SAVE_SETTING : "/user/saveCrossTabSetting",
	TIME_SEQUENCE_SEARCH : "/user/timeSequenceSearch",
	TIME_SEQUENCE_DOWNLOAD : "/user/timeSequenceCreateCSV",
	TIME_SEQUENCE_DOWNLOAD_IMAGE : "/user/timeSequenceCreateImage",
	TIME_TOP_SEARCH : "/user/timeSequenceTopSearch",
	ADD_BOOK_MARK : "/user/addBookMark",
	PERIOD_QUERY_SEARCH : "/user/periodQuerier",
	PERIOD_QUERY_LOAD : "/user/laodPeriodQuerier",

	TAGGING_MULTIPLE_OVERRIDE : "/user/multipleTagOverride",
    TAGGING_MULTIPLE_APPEND : "/user/multipleTagAppend",
    TAGGING_MULTIPLE_DELETE : "/user/multipleTagDelete",
    TAGGING_SINGLE_OVERRIDE : "/user/singleTagOverride",
    TAGGING_SINGLE_APPEND : "/user/singleTagAppend",
    TAGGING_SINGLE_DELETE : "/user/singleTagDelete",


	LOAD_TAG_FIELD_EDITOR : "/user/loadTagFieldEditor",
	MASTER_SEARCH : "/user/masterSearch",
	LOAD_NAVIGATOR : "/user/loadNavigator",
	LOAD_NAVIGATORVIEW : "/user/loadNavigatorView",
	SYNC_NAVI_FIELD_STATUS: "/user/synchronizeFieldStatus",
	LOAD_LISTVIEW : "/user/loadListView",
	LOAD_PIEVIEW : "/user/loadPieView",
	LOAD_BARVIEW : "/user/loadBarView",
	LOAD_LISTBARVIEW : "/user/loadListBarView",
	LOAD_TAGCLOUDVIEW : "/user/loadTagCloudView",
	LOAD_SLIDERVIEW : "/user/loadSliderView",
	LOAD_SELECT_NAVIGATOR : "/user/loadSelectNavigator",
	CHANGE_COLUMN : "/user/changeColumn",
	CHANGE_COLUMN_1 : "/user/changeColumn_1",
	CHANGE_COLUMN_2 : "/user/changeColumn_2",
	CHANGE_COLUMN_3 : "/user/changeColumn_3",
	CHANGE_COLUMN_4 : "/user/changeColumn_4",
	SAVE_SELECT_NAVIGATOR : "/user/saveSelectNavigator",
	DOC_REF : "/user/docRef",
	LOAD_SECURITY_FACTOR_SEARCH : "/user/loadSecurityFactorSearch",
	MESSAGE : "/user/message",
	SECURITY_FACTOR_SEARCH : "/user/securityFactorSearch",
	SECURITY_SAVE_FACTORS : "/user/saveSecurityFactors",

    //contextual recommedation
    LOAD_CONT_RECOM_NAVIGATOR : "/user/loadContRecomNavigator",
    LOAD_CONT_RECOM_NAVIGATORVIEW : "/user/loadContRecomNavigatorView",
    SYNC_CONT_RECOM_NAVI_FIELD_STATUS: "/user/synchronizeContRecomFieldStatus",
    LOAD_CONT_RECOM_LISTVIEW : "/user/loadContRecomListView",
    LOAD_CONT_RECOM_PIEVIEW : "/user/loadContRecomPieView",
    LOAD_CONT_RECOM_BARVIEW : "/user/loadContRecomBarView",
    LOAD_CONT_RECOM_LISTBARVIEW : "/user/loadContRecomListBarView",
    LOAD_CONT_RECOM_TAGCLOUDVIEW : "/user/loadContRecomTagCloudView",
    LOAD_CONT_RECOM_SELECT_NAVIGATOR : "/user/loadContRecomSelectNavigator",
    CHANGE_CONT_RECOM_COLUMN_H : "/user/changeContRecomColumn_H",
    CHANGE_CONT_RECOM_COLUMN_V : "/user/changeContRecomColumn_V",
    SAVE_CONT_RECOM_SELECT_NAVIGATOR : "/user/saveContRecomSelectNavigator",


	// Search Result
	LOAD_BOOKMARK_DIALOG : "/user/loadBookmarkDialog",
	//check
	CHECK_ACTION : "/user/checkAction",

	//qcc
	LOAD_SEARCH_FOLDER : "/user/loadSearchFolder",
	SAVE_SEARCH_FOLDER : "/user/saveSearchFolder",
	LOAD_QUERY_EDITOR : "/user/loadQueryEditor",
    LOAD_QUERY_FOR_EXAMPLE_EDITOR : "/user/loadQueryForExampleEditor",
	GET_SEARCH_FOLDER : "/user/getSearchFolder",
	CONVERT_QCC_JSONQL : "/user/converQCCJSONQL",
	GET_QUERY_TYPE : "/user/getFieldQueryType",


	//personalization action
	LOAD_CHANGE_LAYOUT : "/user/loadChangeLayout",
	CHANGE_LAYOUT : "/user/changeLayout",
	LOAD_ADD_PAGE : "/user/loadAddPage",
	LOAD_ADD_PAGE_DETAIL : "/user/loadAddPageDetail",
	ADD_PAGE : "/user/addPage",
	COPY_PAGE : "/user/copyPage",
	LOAD_PUBLISH_PAGE : "/user/loadPublishPage",
	PUBLISH_PAGE : "/user/publishPage",
	UN_PUBLISH_PAGE : "/user/unPublishPage",
	RENAME_PAGE : "/user/renamePage",
	DELETE_PAGE : "/user/deletePage",
	ADD_ZONE_VIEW : "/user/addZoneView",
	RENAME_ZONE_VIEW : "/user/renameZoneView",
	LOAD_ADD_WIDGETS : "/user/loadAddWidgets",
	ADD_WIDGET : "/user/addWidget",
	DELETE_ZONE_VIEW : "/user/deleteZoneView",
	CHANGE_PAGE : "/user/changePage",
	DELETE_WIDGET : "/user/deleteWidget",
	MODIFY_WIDGET : "/user/modifyWidget",
	MOVE_WIDGET : "/user/moveWidget",
	FETCH_WIDGETS_ID:"/user/fetchWidgetIds",
	MOVE_PAGE : "/user/movePage",
	MOVE_ZONE_VIEW : "/user/moveZoneView",
	CHANGE_THEME : "/user/changeTheme",
	CHANGE_ZONE_VIEW : "/user/changeZoneView",
	LOAD_SHARE_PAGE : "/user/loadSharePage",
	UN_SHARE_PAGE : "/user/unSharePage",
	REDIRECT_PAGE : "/user/redirectPage",
	LOAD_MASTER_BROWSER : "/user/loadMasterBrowser",
	LOAD_MASTER_BROWSER_DATA : "/user/loadMasterBrowserData",
	LOAD_WIDGET_TREE : "/user/loadWidgetTree",
	ABOUT_PAGE : "/user/aboutPage",
	SAVE_PAGES : "/user/savePages",

	//space
	LOAD_SYSTEM_SUB : "/user/loadSystemSub",
	LOAD_CUSTOM_SUB : "/user/loadCustomSub",
	SPACE_ADD_FOLDER : "/user/addFolder",
	SPACE_RENAME_FOLDER : "/user/renameFolder",
	SPACE_DELETE_KO : "/user/deleteKo",
	SPACE_DELETE_NODE : "/user/deleteNode",
	SPACE_INSERT_KO_LINK : "/user/insertKoLink",
	SPACE_UPDATE_NODE_PARENT : "/user/updateNodeParent",
	SPACE_MOVE_KO_LINK_TO_LINK : "/user/moveKoLinkToLink",
	SPACE_LOAD_DEFINITION : "/user/loadSpaceDefinition",
	SPACE_CHANGE_SPACE : "/user/changeShareSpace",
	SPACE_DELETE_SPACE : "/user/deleteShareSpace",
	SPACE_CREATE_SPACE : "/user/createShareSpace",
	SPACE_MODIFY_SPACE : "/user/modifyShareSpace",
	SPACE_SAVE_SPACE : "/user/saveShareSpace",
	SPACE_DOC_REF : "/user/spaceDocRef",
	SPACE_SHOW_MESSAGE: "/user/showMessage",
	SPACE_ADD_FAVORITE_TAG: "/user/addFavoriteTag",
	SPACE_RENAME_KO: "/user/renameKO",
	SPACE_CHANGE_SPACE_FILTER: "/user/changeSpaceFilter",
	SPACE_COPY_NODE_TO_SHARE: "/user/copyNodeToShare",
	SPACE_DELETE_MULTI_NODE: "/user/deleteMultiNode",
	SPACE_KO_ORDER_CHANGE: "/user/changeKOOrder",
	SPACE_NODE_ORDER_CHANGE: "/user/changeNodeOrder",
	SPACE_CHECK_KO_EXISTED: "/user/checkKoExisted",

	//Admin UI
	ADMIN_MENU : "/admin/adminMenu",
	SHOW_LICENCE_INFO : "/admin/showLicenseInfo",
	FIND_ROLE_MAPPING: "/admin/findMapping",
	ROLE_SETTING: "/admin/moreExpand",
	MASTER_MAPPING_EXPAND: "/admin/masterMappingMoreExpand",
	LOAD_MASTER_MAPPING_SETTING: "/admin/loadasterMappingSetting",
	MASTER_FIELD_SEARCH: "/admin/masterFieldSearch",
	MASTER_MAPPING_SAVE: "/admin/masterMappingSave",
	AD_DATA_REFRESH: "/admin/adDataRefresh",
	ROLE_SETTING_SAVE: "/admin/saveRoleSetting",
	LOAD_MASTER_MAPPING: "/admin/loadMasterMapping",
	LOAD_ROLE_REFERENCE: "/admin/loadRoleReference",
	LOAD_ROLE_SETTING: "/admin/loadRoleSetting",
	LOAD_ADD_MASTER_RECORD: "/admin/loadMasterRecordAdd",
	ADD_MASTER_RECORD: "/admin/masterRecordAdd",
	DELETE_MASTER_RECORD: "/admin/deleteMasterRecord",
	DELETE_MASTER_MAPPING: "/admin/deleteMasterMapping", //20081208
	LOAD_JSON_RESULT : "/user/loadJsonSearchResult",
	//QA knowledge object
	LOAD_NEW_QA: "/user/loadNewQADialog",
	SAVE_QA_KO: "/user/saveQAKO",
	LOAD_QA_KO: "/user/loadQAObject",
	SAVE_QA_ANSWER: "/user/saveQAKOAnswer",
	UPDATE_QA_CONTENT: "/user/updateQAContent",
	UPDATE_QA_STATUS: "/user/updateQAStatus",
	DELETE_QA_OBJECT: "/user/deleteQAObject",
	READ_QA_OBJECT: "/user/readQAObject",

	LOAD_CSV_SEARCH_RESULT : "/user/loadCSVSearchResult",
    DOCUMENT_DOWNLOAD : "/user/docDownload"

};

//all events
//request client
var EVENT_AJAXREQUEST_FAILED = "event.ajaxrequest.failed";
var EVENT_MOUSE_DOWN_ON_DRAG = "event.mousedown.onDrag";
//page
var EVENT_PAGE_LOADED = "event.page.loaded";
var EVENT_PAGE_WIDTH_CHANGED = "event.page.width.changed";

//widget
var EVENT_WIDGET_MINIMIZE = "event.widget.minimize";
var EVENT_WIDGET_RESUME = "event.widget.resume";
var EVENT_WIDGET_CLOSE = "event.widget.close";
var EVENT_WIDGET_MOVED = "event.widget.moved";


//personalization manager
var EVENT_MENU_CLICKED = "event.menu.clicked";
var EVENT_BUTTON_ADD_PAGE = "event.button.add_page";
var EVENT_PERSONALIZATION_TEMPLATETYPE = "event.personalization.templatetype";
var EVENT_BUTTON_PUBLISH = "event.button.publish";
var EVENT_PERSONALIZATION_SAVE= "event.personalization.save";
var EVENT_PERSONALIZATION_TAB_DROPDOWN = "event.personalization.tab.dropdown";


//finish search
var EVENT_SEARCH_START = "event.search.start";
var EVENT_SEARCH_END = "event.search.end";
var EVENT_SEARCH_FAILURE = "event.search.failure";
var EVENT_PAGING_END = "event.search.paging.end";

//Qcc
var EVENT_QCC_NEW_CONDITION = "event.qcc.new.line";
var EVENT_SECURITY_FACTOR_SEARCH = "event.security_factor.search";

// bookmark
var EVENT_BOOKMARK_SUCCESS = "event.bookmark.success";
var EVENT_BOOKMARK_FAILURE = "event.bookmark.failure";

// space
var EVENT_SPACE_SELECTED_CHANGE = "event.space.selected.change";
var EVENT_SYSTEM_FOLDER_REFRESH = "event.systemfolder.refresh";
var EVENT_SPACE_KO_DELETED = "event.space.ko.deleted.{koId}";
var EVENT_SPACE_KO_RENAME = "event.space.ko.rename.{koId}";
